<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<UlyssesAgenda.Repositories.Blog.BlogEntryInfo>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Ulysses Agenda Blog</h2>
    
    <ul>
        <% foreach (var blogPost in Model)
           { %>
            
            <li>
                <h3> <%= blogPost.Title %></h3>
                By <%= blogPost.Author %> at <%= blogPost.CreateDateTime.ToString("yyyy-MMM-dd HH:mm tt") %>
                <p> <%= blogPost.PostHtml %> </p>
            </li>
        
        <% } %>
    </ul>
    
    <div>
        <%=Html.ActionLink("Post a new entry", "Create") %>
    </div>
    
    <%--<div class="pagination">

        <% if (Model.HasPreviousPage) { %>
        
            <%= Html.RouteLink("<<< Previous Page", 
                               "Index", 
                               new { page=(Model.PageIndex-1) }) %>
        
        <% } %>
        
        <% if (Model.HasNextPage) { %>
        
            <%= Html.RouteLink("Next Page >>>", 
                               "Index", 
                               new { page = (Model.PageIndex + 1) })%>
        
        <% } %>    

    </div>--%>


</asp:Content>
